<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript" src="js/jquery-3.4.1.js"></script>
		<script>
			//爸爸给自己找儿子
			function fun01(){
				$("#father").append($("#son"))
			}
			
			//显示
			function fun02(){
				$("#son").appendTo($("#father"))
			}
			
		</script>
		
		<style type="text/css">
			#father{
				width: 200px;
				height: 200px;
				background-color: green;
				font-size: 30px;
				color: red;
				margin-bottom: 10px;
			}
			
			#son{
				width: 80px;
				height: 80px;
				background-color: red;
				font-size: 30px;
				color: yellow;
				margin-bottom: 10px;
			}
		</style>
	</head>
	<body>
		<div id="father">
			我是爸爸
		</div>
		
		<div id="son">
			我是儿子
		</div>
		
		<input type="button"  value="爸爸给自己找儿子" onclick="fun01()">
		<input type="button"  value="儿子给自己找爸爸" onclick="fun02()"/>
	</body>
</html>
